<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        Event Detail
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Event</a></li>
        <li class="active">Detail</li>
    </ol>
</section>
<!-- Main content -->
<section class="content">
    <!-- Main row -->
    <div class="row">
        <div class='col-md-12'>
            <div class='box box-info'>
                <div class='box-header'>
                    <h3 class='box-title'>Detail Data<small> Events</small></h3>
                    <!-- tools box -->
                    <div class="pull-right box-tools">
                        <button class="btn btn-default btn-sm" data-widget='collapse' data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
                    </div><!-- /. tools -->
                </div><!-- /.box-header -->
                <div class='box-body pad'>
                    <?php
                    if(isset($success_status)){
                        ?>
                    <div id="msg_success" class="alert alert-success alert-dismissable">
                        <i class="fa fa-check"></i>
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">x</button>
                        <b>Congratulation!</b> Data has been updated.
                    </div>
                    <div id="msg" class="alert alert-danger alert-dismissable">
                        <i class="fa fa-ban"></i>
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">x</button>
                        <b>Alert!</b> Danger alert preview. This alert is dismissable. A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.
                    </div>                    
                        <?php
                    }
                    else{
                    ?>
                    <div id="msg" class="alert alert-danger alert-dismissable">
                        <i class="fa fa-ban"></i>
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">x</button>
                        <b>Alert!</b> Danger alert preview. This alert is dismissable. A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.
                    </div>
                    <?php
                    }
                    ?>
                    <form role="form" action="" method="post" enctype="multipart/form-data" id="frm_update_event">
                        <?php
                        foreach($list_data as $r):
                        ?>
                        <div class="form-group">
                            <label>Judul</label>
                            <input type="text" id="judul" name="judul" class="form-control" value="<?php echo $r->judul;?>" placeholder="Masukkan Judul"/>
                        </div>
                        <div class="form-group">
                            <label>Tempat / Place</label>
                            <input type="text" id="place" name="place" class="form-control" value="<?php echo $r->place;?>" placeholder="Masukkan Lokasi Event"/>
                        </div>
                        <div class="form-group">
                            <label for="dtp_input1">Tanggal Event</label><br/>
                            <div style="padding-left: 0px;" class="input-group date form_datetime col-md-6" data-date="<?php $r->eventdate;?>" data-date-format="yyyy-mm-dd HH:ii:ss" data-link-field="dtp_input1">
                                <input id="tanggal_event"  class="form-control" size="16" type="text" value="<?php echo $r->eventdate;?>" readonly>
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-remove"></span>
                                </span>
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-th"></span>
                                </span>
                            </div>
                            <input type="hidden" name="tanggal_event" id="dtp_input1" value="" /><br/>
                        </div>
                        <div class="form-group">
                            <label>Isi Konten</label>
                            <textarea id="editor1" name="content" placeholder="Masukkan isi konten event" style="width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"><?php echo $r->content;?></textarea>    
                        </div>
                        
                        <div class="form-group">
                            <label for="userfile">Gambar event</label><br />
                            <img style="width: 50%;border:1px solid #ddd;padding: 5px;" src="<?php echo site_url().$r->image;?>" />
                        </div>
                        <div class="form-group">
                            <label for="userfile">Gambar event</label>
                            <input type="file" accept='image/*' id="userfile" name="userfile" />
                            <p class="help-block">.jpg .jpeg .png.</p>
                        </div>
                        <?php
                        endforeach;
                        ?>
                        <div class="form-group" style="border-top: 1px dotted #ddd;padding-top: 20px;">
                            <button type="submit" id="btn-add-event" class="btn btn-primary">Update</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>    
</section>